﻿@page "_Host"
@using Microsoft.AspNetCore.Components.Web;
@using ThingsGateway.Web.Rcl.Core;
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>ThingsGateway</title>
    <base href="/" />

    <link href="_content/Masa.Blazor/css/masa-blazor.min.css" rel="stylesheet" />
    <link href=@(BlazorConst.ResourceUrl+"css/materialdesign/v6.x/css/materialdesignicons.min.css") rel="stylesheet">
    <link href=@(BlazorConst.ResourceUrl+"css/material/materialicons.css") rel="stylesheet">
    <link href=@(BlazorConst.ResourceUrl+"css/fontawesome/v5.15.4/css/all.min.css") rel="stylesheet">
    <link href=@(BlazorConst.ResourceUrl+"TB.css") rel="stylesheet">

    <script>
        window.downloadFileFromStream = async (fileName, contentStreamReference) => {
            const arrayBuffer = await contentStreamReference.arrayBuffer();
            const blob = new Blob([arrayBuffer]);
            const url = URL.createObjectURL(blob);
            const anchorElement = document.createElement('a');
            anchorElement.href = url;
            if (fileName == null) fileName = ""
            anchorElement.download = fileName;
            anchorElement.click();
            anchorElement.remove();
            URL.revokeObjectURL(url);
        }
    </script>
    <!-- PWA Manifest -->
    <link rel="manifest" href="./manifest.json" />


    <component type="typeof(HeadOutlet)" render-mode="ServerPrerendered" />

</head>


<body>

    <app>
        <component type="typeof(BlazorApp)" render-mode="ServerPrerendered" />
    </app>


    <script src="_framework/blazor.server.js"></script>
    <script src=@(BlazorConst.ResourceUrl+"js/jquery-3.5.1.js") type="text/javascript" charset="UTF-8"></script>
    <script src="_content/BlazorComponent/js/blazor-component.js"></script>
    <!-- PWA Service Worker -->
    <script type="text/javascript">'serviceWorker' in navigator && navigator.serviceWorker.register('./service-worker.js')</script>

</body>

</html>
